<!--  -->
<template>
  <div>
    <a-input
      v-if="componentType === 'input'"
      v-model="record[column.dataIndex]"
      placeholder="输入可修改"
    />
    <a-select
      v-else-if="componentType === 'select'"
      v-model="record[column.dataIndex]"
      not-found-content="暂无数据"
      :options="col.options"
    >
    </a-select>
    <a-switch
      v-else-if="componentType === 'switch'"
      v-model="record[column.dataIndex]"
    />
    <a-radio-group
      v-else-if="componentType === 'radio'"
      v-model="record[column.dataIndex]"
      :options="col.options"
    >
    </a-radio-group>
    <a-tree-select
      v-else-if="componentType === 'treeSelect'"
      v-model="record[column.dataIndex]"
      style="width: 100%"
      :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
      :tree-data="col.options"
      placeholder="请选择"
      tree-default-expand-all
    />
    <rendom
      v-else-if="componentType === 'render'"
      :render="col.render"
      :data="record"
      :index="index"
    ></rendom>
    <span v-else>
      {{ text }}
    </span>
  </div>
</template>

<script lang='ts' src='./index.ts'></script>
<style lang='scss' scoped>
@import "./_index.scss";
</style>